package com.itheima.controller;

import com.itheima.pojo.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@RestControllerAdvice
public class PojectException {

    @ExceptionHandler
    public R EE(RuntimeException e){
        return new R(0,e.getMessage(),null,null);
    }
}
